#coding:utf-8
from django.conf.urls.defaults import *
from django.views.generic import list_detail

urlpatterns = patterns('',
    (r'^list/((?P<page>[0-9]+)/)?$', 'posts.views.post_list'),
    (r'^list/ajax/(?P<page>[0-9]+)/?$', 'posts.views.post_list_ajax'),
    (r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$', 'posts.views.post_list_month'),
    (r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<post_id>\d+)/$', 'posts.views.post_detail'),
    #(r'^(\d{4}/\d{2}/\d{2}/)?(?P<slug>\w+)/$', 'web.posts.views.getPostBySlug'),
    (r'^\d{4}/\d{1,2}/(?P<post_id>\d+)/comment/add/$', 'posts.views.comment_add'),
    (r'^\d{4}/\d{1,2}/(?P<post_id>\d+)/comment/(?P<comment_id>\d+)/delete/$', 'posts.views.comment_delete'),
)
